home *** CD-ROM | disk | FTP | other *** search
/ Disc to the Future 2 / Disc to the Future Part II Programmer's Reference (Wayzata Technology)(6013)(1992).bin / MAC / THINKC / 1_0-2 / EARTHPLO / EP_INIT.C < prev    next >
C/C++ Source or Header  |  1987-12-25  |  2KB  |  69 lines

  1. #include "ep.const.h"
  2. #include "ep.extern.h"
  3. #include "ToolBoxUtil.h"
  4.  
  5. extern    cMouse();
  6. extern    cKey();
  7. extern    cUpdate();
  8. extern    cActivate();
  9. extern    cClose();
  10. extern    cClobber();
  11.  
  12. extern    eMouse();
  13. extern    eKey();
  14. extern    eUpdate();
  15. extern    eActivate();
  16. extern    eClose();
  17. extern    eClobber();
  18.  
  19. epInit()
  20. {
  21.     watchCursorHand = GetCursor(watchCursor);
  22.     HLock(watchCursorHand);
  23.  
  24.     iconHandle = GetIcon(iconID);
  25.  
  26.     initGlobalRects();
  27.  
  28.     ebmPict = GetPicture(110);
  29.     ePict   = ebmPict;
  30.  
  31.     eWindow = NewWindow (nil, &earthWindowRect, "\pEarthView", 
  32.                          true, 8, -1L, true, 0L);
  33.  
  34.     SkelWindow (eWindow, eMouse, eKey, eUpdate, eActivate, eClose,
  35.                          eClobber, nil, false);
  36.  
  37.     cWindow = NewWindow (nil, &controlWindowRect, "\pSettings",
  38.                          true, documentProc, -1L, true, 0L);
  39.     SkelWindow (cWindow, cMouse, cKey, cUpdate, cActivate, cClose,
  40.                          cClobber, nil, false);
  41.  
  42.     latSB        = NewControl(cWindow,&latSBRect,"",TRUE,  0,0, 90,16,0L);    
  43.     lonSB        = NewControl(cWindow,&lonSBRect,"",TRUE,  0,0,180,16,0L);    
  44.     altSB        = NewControl(cWindow,&altSBRect,"",TRUE,160,1,160,16,0L);    
  45.  
  46.     northCheck    = NewControl(cWindow,&northRect,"\pNorth",    TRUE,1,0,1,2,0L);
  47.     southCheck    = NewControl(cWindow,&southRect,"\pSouth",    TRUE,0,0,1,2,0L);
  48.     eastCheck    = NewControl(cWindow,&eastRect,    "\pEast",    TRUE,1,0,1,2,0L);
  49.     westCheck    = NewControl(cWindow,&westRect,    "\pWest",    TRUE,0,0,1,2,0L);
  50.     mileCheck    = NewControl(cWindow,&mileRect,    "\pMiles",    TRUE,1,0,1,2,0L);
  51.     kmCheck        = NewControl(cWindow,&kmRect,"\pKilometers",TRUE,0,0,1,2,0L);
  52.  
  53.     npictButton        = 0;
  54.     nbitmapButton    = 1;
  55.     nintButton        = 1;
  56.     nfpButton        = 0;
  57.     nhiddenlinesBox    = 1;
  58.     nlnlBox            = 0;
  59.     nsquareBox        = 1;
  60.  
  61.     backgroundC            = whiteColor;
  62.     earthbackgroundC    = whiteColor;
  63.     earthoutlineC        = blackColor;
  64.     latC                = redColor;
  65.     longC                = redColor;
  66.     landC                = blueColor;
  67. }
  68.  
  69.